#include <iostream>
#include <functional>
#include <array>
using namespace std;

void Test1(){
    array<int, 10> a1;
    int a2[10];
    int *ptr = &a1[0];
    *(ptr-1) = -10;
    cout << *(ptr-1) << endl;
    //a1[10];
    //a1[15];
    *(a2-2) = -2;
    cout << *(a2-2) << endl;
    *(a2-1) = -1;
    cout << *(a2-1) << endl;
    cout << a2[10] << endl;
    cout << a2[15] << endl;
    //a2[10] = 1;
    a2[20] = 1;
    cout << a2[20] << endl;
}

//template <class T>
//struct Less{
//  bool operator()(const T &l, const T &r)
//  {
//    cout << "Less" << endl;
//    return l < r;
//  }
//};
//
//template <class T>
//struct Less<T*>{
//  bool operator()(const T *l, const T *r)
//  {
//    cout << "Less<T*>" << endl;
//    return  *l<*r;
//  }
//};

template <class T>
bool Less(const T& l, const T& r)
{
  cout << "Less" << endl;
  return l < r;
}

template <>
bool Less<int*>(const int*& l, const int*& r)
{
  cout << "Less<T*>" << endl;
  return  l<r;
}


void Test2(){
  //int i1 = 1;
  //int i2 = 2;
  //double d1 = 5.5;
  //double d2 = 2.2;
  //Less<int> ls;
  //Less<int*> pls;
  //cout << ls(i1, i2) << endl;
  //cout << pls(&i1, &i2) << endl;
  //Less<double> dls;
  //Less<double*> dpls;
  //cout << dls(d2, d1) << endl;
  //cout << dpls(&d2, &d1) << endl;
}

void Test3(){
  int i1 = 1;
  int i2 = 2;
  cout << Less(i1, i2) << endl;
  cout << Less(&i1, &i2) << endl;
	int *p1 = &i1;
	int*& rp = p1;
	cout << *rp << endl;
	*rp =10;
	cout << i1 << endl;		
}

template <int N = 10>
class arr{
  int arr[N];
};

int main()
{
  //Test3(); 
  arr<> a;

  return 0;
}
